package zl.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class ScannerDemo
{
	public static void main(String[] args) throws FileNotFoundException
	{
		File file = new File("C:" + File.separator + "Test.txt");
		Scanner in = new Scanner(new FileInputStream(file));
		StringBuffer sb = new StringBuffer();
		in.useDelimiter("\n");  //设置换行符
		while(in.hasNext())
		{
			sb.append(in.next() + "\n");
		}
		System.out.println(sb);
	}
}